body, html {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background-color: #000000;
  overflow: hidden;
  -webkit-user-select: none;
  font-family: 'Roboto', sans-serif;
  font-size: 12px;
  cursor: default;
}

.right {
  float: right;
}

.hidden {
  display: none;
}

#player {
  width: 100%;
  height: 100%;
}

#drag-video {
  z-index: 99;
  position: absolute;
  top: 24px;
  bottom: 50px;
  left: 0;
  right: 0;
}

#splash {
  width: 100%;
  height: 100%;
  background-image: url('splash.gif');
  background-size: 100%;
  background-position: -50%;
  background-repeat: no-repeat;
  -webkit-filter: grayscale(100%);
}

#overlay {
  opacity: 0;
  z-index: 10;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  transition: opacity 0.3s ease;
}

#popup {
  opacity: 0;
  display: none;
  position: absolute;
  z-index: 20;
  right: 5px;
  bottom: 55px;
  top: 100px;
  width: 400px;
  background-color: #1F2021;
  border-radius: 3px;
  font-size: 14px;
  transition: opacity 0.3s ease;
}

#popup.chromecast #chromecast-popup {
  display: block;
}

#popup.chromecast #playlist-popup {
  display: none;
}

#popup.playlist #playlist-popup {
  display: block;
}

#popup.playlist #chromecast-popup {
  display: none;
}

#playlist-entries, #chromecast-entries {
  position: absolute;
  top: 46px;
  bottom: 55px;
  right: 0;
  left: 0;
  overflow: auto;
}

.playlist-entry, .chromecast-entry {
  color: #fff;
  font-size: 13px;
  padding: 10px 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@-webkit-keyframes spin {
  to { -webkit-transform: rotate(360deg); }
}

@-moz-keyframes spin {
  to { -moz-transform: rotate(360deg); }
}

@-ms-keyframes spin {
  to { -ms-transform: rotate(360deg); }
}

@-o-keyframes spin {
  to { -o-transform: rotate(360deg); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.playlist-entry .status {
  float: right;
  -webkit-animation: spin 1.5s infinite linear;
  -moz-animation: spin 1.5s infinite linear;
  -ms-animation: spin 1.5s infinite linear;
  -o-animation: spin 1.5s infinite linear;
  animation: spin 1.5s infinite linear;
}

.playlist-entry .status:before {
  font-size: 14px;
}

.playlist-entry .status:after {
  -webkit-transform: rotate(45deg);
  -moz-transform: rotate(45deg);
  -ms-transform: rotate(45deg);
  -o-transform: rotate(45deg);
  transform: rotate(45deg);
}

.playlist-entry.odd, .chromecast-entry.odd {
  background-color: #222324;
}

.playlist-entry.selected, .chromecast-entry.selected {
  background-color: #31A357;
}

#popup .header {
  background-color: #363738;
  color: #E1E1E1;
  font-size: 16px;
  line-height: 16px;
  padding: 15px;
  border-radius: 3px 3px 0 0;
}

#popup .button {
  margin: 10px;
  background-color: #31A357;
  padding: 10px;
  text-align: center;
  color: #E1E1E1;
  border-radius: 3px;
}

#controls-timeline-tooltip {
  background: #1F2021;
  border-radius: 3px;
  box-shadow: 0px 1px 2px rgba(0,0,0,.2);
  padding: 4px 8px;
  color: #fff;
  text-align: center;
  font-size: 11px;
  position: absolute;
  bottom: 53px;
  z-index: 100;
  opacity: 0;
  transition: opacity 0.25s;
}

#controls-timeline-tooltip:after {
  width: 0;
  height: 0;
  top: 100%;
  left: 50%;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid #1F2021;
  content: "";
  margin-left: -6px;
  position: absolute;
}

#popup .button.bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
}

#idle {
  position: absolute;
  top: 24px;
  bottom: 50px;
  left: 0;
  right: 0;
}

.hide-cursor {
  cursor: none;
}

.hide-cursor #overlay {
  opacity: 0 !important;
}

body:hover #overlay, body:hover .titlebar {
  opacity: 1;
}

.titlebar {
  background-color: #1F2021;
}

#controls {
  z-index: 11;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 50px;
  background-color: #1F2021;
  color: #727374;
}

#controls .center {
  margin-top: 13px;
}

#controls-timeline {
  background-color: #303233;
  height: 10px;
  width: 100%;
}

#controls-timeline-position {
  background-color: #31A357;
  width: 0%;
  height: 10px;
  transition: width 0.25s linear;
}

.controls-secondary {
  padding: 6px 10px 0 0;
}

#player-downloadspeed, #controls-playlist, #controls-chromecast {
  margin-right: 11px;
}

#controls-play {
  margin: 6px 5px 6px 14px;
}

#controls-repeat {
  margin: 6px 0 6px 5px;
  min-width: 40px;
}

#controls-repeat.repeating .mega-ion:before,
#controls-repeat.repeating .mega-ion:after {
  color: #31A357;
}

#controls-repeat.one .mega-ion:after {
  content: '1';
  padding-left: 2px;
}

#controls-play, #controls-repeat, #player-downloadspeed, #controls-fullscreen, #controls-playlist, #controls-chromecast {
  float: left;
}

#controls-play .mega-ion, #player-downloadspeed .mega-ion,
#controls-fullscreen .mega-ion, #controls-playlist .mega-ion {
  /* this is the click buffer */
  padding: 3px 6px;
}

#controls-play span:hover .mega-ion, #player-downloadspeed span:hover .mega-ion,
#controls-fullscreen span:hover .mega-ion, #controls-playlist span:hover .mega-ion,
#controls-chromecast span:hover .mega-ion {
  color: #31A357;
}

#controls-chromecast .chromecast {
  background-image: url('chromecast.png');
  background-size: 26px 72px;
  background-repeat: no-repeat;
  background-position: 0px 0px;
  margin-top: 6px;
  display: block;
  width: 26px;
  height: 18px;
}
#controls-chromecast .chromecast:hover, #controls-chromecast.selected .chromecast {
  background-position: 0px -18px;
}
.chromecasting #controls-chromecast .chromecast {
  background-position: 0px -36px;
}
.chromecasting #controls-chromecast .chromecast:hover, .chromecasting #controls-chromecast.selected .chromecast {
  background-position: 0px -54px;
}

#player-downloadspeed {
  margin-top: 4px;
  padding: 3px 20px;
}

#controls-playlist.selected .mega-ion {
  color: #31A357;
}

.mega-ion:before {
  color: #F0F0F0;
  font-size: 30px;
}

#controls-play .mega-ion {
  color: #31A357;
}

#controls-time {
  width: 100px;
  margin-left: 5px;
  float: left;
}

#controls-main {
  display: none;
}

#controls-time-current {
  color: #F0F0F0;
}

#controls-time-current, #controls-time-total {
  display: inline-block;
  min-width: 33px;
}

#controls-volume,
#controls-pbrate {
  padding: 6px 5px;
  float: left;
}

#controls-volume .mega-ion,
#controls-pbrate .mega-ion {
  display: inline-block;
  vertical-align: middle;
}

.slider {
  -webkit-appearance: none;
  width: 50px;
  height: 3px;
  border-radius: 0px;
  vertical-align: middle;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  background-color: #31A357;
  opacity: 1.0;
  width: 7px;
  height: 7px;
  border-radius: 3.5px;
}

.slider:focus {
  outline: none;
}

.hidden-slider .slider,
.hidden-slider .slider::-webkit-slider-thumb {
  width: 0;
  transition: width 100ms;
}

.hidden-slider:hover .slider {
  width: 50px;
}

.hidden-slider:hover .slider::-webkit-slider-thumb {
  width: 7px;
}

#controls-name {
  float: left;
  margin-left: 20px;
}
